package com.yaowk.system.api;

import com.yaowk.common.api.PageReq;
import com.yaowk.common.api.PageResp;
import com.yaowk.system.api.model.Resource;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("system")
@RequestMapping("/system/resource")
public interface ResourceApi {

    @GetMapping
    PageResp<Resource> list(Resource resource, PageReq pageReq);

    @GetMapping("/{id}")
    Resource findOne(@PathVariable Long id);

    @PostMapping
    Resource save(Resource resource);

    @DeleteMapping("/{id}")
    void delete(@PathVariable Long id);
}
